package com.top10.controller;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.top10.bean.ResponseBean;
import com.top10.entity.SystemInfo;
import com.top10.service.ISystemInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统信息Controller
 * @author ellen
 * @version 1.0
 * @date 2018/10/1 12:56
 */
@RestController
@RequestMapping("/systemInfo")
public class SystemInfoController {

    @Autowired
    ISystemInfoService systemInfoService;

    /**
     * 联系我们
     * @return
     */
    @RequestMapping("/contact")
    public ResponseBean contact(){
        SystemInfo systemInfo = systemInfoService.selectOne(new EntityWrapper<SystemInfo>().eq("name", "TOP10"));

        return ResponseBean.createSuccess().addData("systemInfo", systemInfo);
    }

}
